package city.spring.modules.material.repository;

import city.spring.modules.material.entity.MaterialinventoryEmployeeExtEntity;
import city.spring.modules.material.vo.MaterialinventoryUserVO;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 存储库：物资盘点与盘点人员关系
 *
 * @author 谢金婷
 * @date 2020-07-27 09:44:54
 */
@Repository
public interface MaterialinventoryEmployeeExtRepository extends BaseMapper<MaterialinventoryEmployeeExtEntity> {
    /**
     * 获取盘点计划的用户列表
     *
     * @param wrapper 查询对象
     * @return
     */
    List<MaterialinventoryUserVO> getUsers(@Param(Constants.WRAPPER) Wrapper<? extends MaterialinventoryEmployeeExtEntity> wrapper);

    /**
     * 获取方案的用户列表
     *
     * @param inventoryId 排班方案ID
     * @return
     */
    List<MaterialinventoryUserVO> getInventoryUsers(String inventoryId);

    /**
     * 获取方案的某个用户
     *
     * @param inventoryId 排班方案ID
     * @param extId       主键ID
     * @return
     */
    MaterialinventoryUserVO getInventoryUser(String inventoryId, Long extId);
}